﻿using System;

namespace Pogo.Data
{
   internal class Share
   {
      internal Device ParentDevice { get; set; }
      internal Service ParentService { get; set; }
      
      internal string DeviceID { get; set; }
      internal string ServiceID { get; set; }
      internal string FileID { get; set; }
      internal string URL { get; set; }
      internal int Type { get; set; }
      internal long MTime { get; set; }
      internal long CTime { get; set; }
      internal long OrigTime { get; set; }
      internal string StreamType { get; set; }
      internal bool PasswordSet { get; set; }

      public string Name { get; set; }
      public string MimeType { get; set; }
      public long Size { get; set; }

      public DateTime CreationDate
      {
         get { return new DateTime(1970, 1, 1).AddMilliseconds(CTime); }
      }

      public DateTime LastModifiedDate
      {
         get { return new DateTime(1970, 1, 1).AddMilliseconds(MTime); }
      }

      public FileType FileType
      {
         get { return (FileType)Type; }
      }
   }
}